package com.entity;

import java.io.Serializable;

/**
 * @author 
 */
public class Orderdetail implements Serializable {
    private String odid;

    private String orid;

    private String gid;

    private Integer grealprice;

    private Integer gnum;

    Goods goods;

    public Goods getGoods() {
        return goods;
    }

    public void setGoods(Goods goods) {
        this.goods = goods;
    }

    private static final long serialVersionUID = 1L;

    public String getOdid() {
        return odid;
    }

    public void setOdid(String odid) {
        this.odid = odid;
    }

    public String getOrid() {
        return orid;
    }

    public void setOrid(String orid) {
        this.orid = orid;
    }

    public String getGid() {
        return gid;
    }

    public void setGid(String gid) {
        this.gid = gid;
    }

    public Integer getGrealprice() {
        return grealprice;
    }

    public void setGrealprice(Integer grealprice) {
        this.grealprice = grealprice;
    }

    public Integer getGnum() {
        return gnum;
    }

    public void setGnum(Integer gnum) {
        this.gnum = gnum;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Orderdetail other = (Orderdetail) that;
        return (this.getOdid() == null ? other.getOdid() == null : this.getOdid().equals(other.getOdid()))
            && (this.getOrid() == null ? other.getOrid() == null : this.getOrid().equals(other.getOrid()))
            && (this.getGid() == null ? other.getGid() == null : this.getGid().equals(other.getGid()))
            && (this.getGrealprice() == null ? other.getGrealprice() == null : this.getGrealprice().equals(other.getGrealprice()))
            && (this.getGnum() == null ? other.getGnum() == null : this.getGnum().equals(other.getGnum()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getOdid() == null) ? 0 : getOdid().hashCode());
        result = prime * result + ((getOrid() == null) ? 0 : getOrid().hashCode());
        result = prime * result + ((getGid() == null) ? 0 : getGid().hashCode());
        result = prime * result + ((getGrealprice() == null) ? 0 : getGrealprice().hashCode());
        result = prime * result + ((getGnum() == null) ? 0 : getGnum().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", odid=").append(odid);
        sb.append(", orid=").append(orid);
        sb.append(", gid=").append(gid);
        sb.append(", grealprice=").append(grealprice);
        sb.append(", gnum=").append(gnum);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}